class CreateOrderItems < ActiveRecord::Migration
  def self.up
    create_table :order_items do |t|
      t.integer :order_id, :null => false
      t.string :task_type
      t.string :direction
      t.string :side
      t.integer :position_id
	    t.integer :inside_position_id
      t.string :damage_shape
      t.float :area_x, :default => 0
      t.float :area_y, :default => 0
      t.string :damage_degree
      t.string :metal_shape
      t.string :work_judge
      t.float :uninstall_index, :default => 0
      t.float :cut_index, :default => 0
      t.float :frame_amend_set_index, :default => 0 
      t.float :frame_amend_index, :default => 0
      t.float :metal_index, :default => 0
      t.float :metal_putty_index, :default => 0
      t.float :putty_index, :default => 0
      t.float :surface_index, :default => 0
      t.float :paint_index, :default => 0
      t.float :assemble, :default => 0
      t.float :recombine, :default => 0
      t.float :polish, :default => 0
      t.string :spoiler
      t.string :disassemble
      t.string :chap
      t.string :hollow
      t.string :curve
      t.string :paint_completion
      t.timestamps
    end
  end

  def self.down
    drop_table :order_items
  end
end
